Primary exercises

  1. In the survey dataset add a new column feet with heights reported in feet unit (1 foot = 30.48 cm).

  2. In the survey dataset add a new column diffWritingHandSpan : the difference of span1 (writing hand) and span2 (non-writing hand).

  3. In the pulse dataset add new weight variables pounds and stones (1 kg = 2.20462 pound = 0.157473 stone).

Extra exercises

In the survey dataset:

  1. Add a new column diffHandSpan : the absolute difference between span1 (writing hand) and span2 (non-writing hand). Hint: use abs function (?abs).

  2. Change height unit from cm to inch (1 cm = 0.393701 inch).

Extra extra exercises

Here we are going to apply multiple functions in composition.

  1. Produce the tibble containing the personal information of only those having height (in foot unit) between and including 6.0 and 6.5 feet.

  2. How many observations are in the following call, please try to reason before running the statement.

filter(mutate(filter(survey, height> 190),feet=height/30.48),height<=190 )


Copyright © 2021 Biomedical Data Sciences (BDS) | LUMC